import request from '@/utils/request';
// 查询供应商列表
export function getSupplyList(query) {
  return request({
    url: '/heart/Supplier/list',
    method: 'get',
    params: query
  })
}
// 删除供应商列表
export function deleteSupply(query) {
  return request({
    url: '/heart/Supplier/' + query,
    method: 'delete',
  })
}
// 暂存供应商
export function saveSupply(data) {
  return request({
    url: '/heart/Supplier/draft',
    method: 'post',
    data
  })
}
// 提交供应商
export function submitSupply(data) {
  return request({
    url: '/heart/Supplier/submit',
    method: 'post',
    data
  })
}

//add
export function add(data, name) {
  return request({
    url: `/heart/${name}`,
    method: 'post',
    data
  });
}
//edit
export function edit(data, name) {
  return request({
    url: `/heart/${name}`,
    method: 'put',
    data
  });
}
//delete
export function del(id, name) {
  return request({
    url: `/heart/${name}/` + id,
    method: 'delete',
  });
}